//
// Created by yuping.li on 10/14/24.
//

#include "cpp_adapter.h"
#include "single_thread_scheduler.hpp"
#include "misc/led_indicator.hpp"
#include "auto_boiler/auto_boiler.hpp"
#include "tim/iwdg_task.hpp"

void cpp_startup() {
  Time::instance().init(&hrtc);
  auto scheduler = std::make_unique<SingleThreadScheduler>();
  scheduler->add_task(std::make_unique<IWDGTask>());
  scheduler->add_task(std::make_unique<LedIndicatorTask>(1000U, GPIOC, GPIO_PIN_13));
  scheduler->add_task(std::make_unique<AutoBoiler>());
  scheduler->scheduler();
}